import {View,Text, StyleSheet,ImageBackground} from 'react-native';
import bg from '../../assets/bg_card.png'
export default function ImageBackgrounDemo() {
  return (
      <View style={styles.container}>
        <ImageBackground
            style={styles.viewStyle}//外部样式
            imageStyle={styles.imgStyle}//内部图片样式
            source={bg}
        >
          <Text >
            {`招商银行\n`}
            <Text >
              {`储蓄卡\n\n`}
            </Text>
          </Text>
        </ImageBackground>
      </View>
  );
}
const styles = StyleSheet.create({
  container: {
    width: '100%',
    height: '100%',
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
  viewStyle: {
    width: '100%',
    height:120,
  },
  imgStyle: {//图片样式
    resizeMode: 'cover',
    borderRadius: 12,
  }

});

